package com.ruoyi.front.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.front.mapper.SFeatureMapper;
import com.ruoyi.front.domain.SFeature;
import com.ruoyi.front.service.ISFeatureService;
import com.ruoyi.common.core.text.Convert;

/**
 * 首页文章Service业务层处理
 * 
 * @author jyp
 * @date 2021-07-22
 */
@Service
public class SFeatureServiceImpl implements ISFeatureService 
{
    @Autowired
    private SFeatureMapper sFeatureMapper;

    /**
     * 查询首页文章
     * 
     * @param id 首页文章ID
     * @return 首页文章
     */
    @Override
    public SFeature selectSFeatureById(String id)
    {
        return sFeatureMapper.selectSFeatureById(id);
    }

    /**
     * 查询首页文章列表
     * 
     * @param sFeature 首页文章
     * @return 首页文章
     */
    @Override
    public List<SFeature> selectSFeatureList(SFeature sFeature)
    {
        return sFeatureMapper.selectSFeatureList(sFeature);
    }

    @Override
    public List<SFeature> selectList(SFeature sFeature)
    {
        return sFeatureMapper.selectList(sFeature);
    }

    /**
     * 新增首页文章
     * 
     * @param sFeature 首页文章
     * @return 结果
     */
    @Override
    public int insertSFeature(SFeature sFeature)
    {
        sFeature.setCreateTime(DateUtils.getNowDate());
        return sFeatureMapper.insertSFeature(sFeature);
    }

    /**
     * 修改首页文章
     * 
     * @param sFeature 首页文章
     * @return 结果
     */
    @Override
    public int updateSFeature(SFeature sFeature)
    {
        return sFeatureMapper.updateSFeature(sFeature);
    }

    /**
     * 删除首页文章对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSFeatureByIds(String ids)
    {
        return sFeatureMapper.deleteSFeatureByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除首页文章信息
     * 
     * @param id 首页文章ID
     * @return 结果
     */
    @Override
    public int deleteSFeatureById(String id)
    {
        return sFeatureMapper.deleteSFeatureById(id);
    }
}
